<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src='https://webapi.amap.com/maps?v=2.0&key=f579df58dc9a00ea84e51da05f8c24de'></script>
</head>

<body>
  <div id="map" style="width: 600px;height: 800px;"></div>
  <script>
    var map = new AMap.Map('map', {
      zoom: 12
    })

    AMap.plugin('AMap.PlaceSearch', function () {//异步加载插件
      // 使用poi搜索插件
      var placeSearch = new AMap.PlaceSearch({
        // city 指定搜索所在城市，支持传入格式有：城市名、citycode和adcode
        city: '合肥'
      });

      placeSearch.search('spa', function (status, result) {
        // 查询成功时，result即对应匹配的POI信息
        console.log(status, result);
      });
    });

  </script>
</body>

</html>